package com.tx.websocket.demo.dao;

import com.tx.websocket.demo.common.OffsetBean;
import com.tx.websocket.demo.model.BaseResource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ResourceDao {

    Integer addResources(BaseResource baseResource);

    List<BaseResource> listResources(@Param("baseResource") BaseResource baseResource, @Param("offsetBean") OffsetBean offsetBean);

    Integer totalResources(@Param("baseResource") BaseResource baseResource);

    BaseResource getResourcesByPrimaryKey(@Param("id") Long id);

    Integer delResourcesByPrimaryKey(@Param("id") Long id);

    Integer updateResources(BaseResource baseResource);

    List<BaseResource> listResByUserId(Long userId);

    List<BaseResource> listResByRoleId(Long roleId);
}
